import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/Home.vue'

Vue.use(VueRouter)

const routes = [
    {
        path :'/',
        redirect : '/first',
        component : Home,
        children : [
            {
                path :'/first',
                name : 'first',
                component : () => import(/* webpackChunkName: "first" */ '../views/Home/First/First.vue')
            },
            {
                path :'/order',
                name : 'order',
                component : () => import(/* webpackChunkName: "order" */ '../views/Home/Order/Order.vue')
            },
            {
                path :'/shop',
                name : 'shop',
                component : () => import(/* webpackChunkName: "shop" */ '../views/Home/Shop/Shop.vue')
            },
            {
                path :'/from',
                name : 'from',
                component : () => import(/* webpackChunkName: "from" */ '../views/Home/From/From.vue')
            },
            {
                path :'/mine',
                name : 'mine',
                component : () => import(/* webpackChunkName: "mine" */ '../views/Home/Mine/Mine.vue')
            },
        ]
    },
    {
        path :'*',
        name : '404',
        component : () => import(/* webpackChunkName: "mine" */ '../views/404.vue')
    },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
